﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x020000D3 RID: 211
	internal class InvalidExt : IExtDecoder
	{
		// Token: 0x0600031E RID: 798 RVA: 0x0000C186 File Offset: 0x0000A586
		private InvalidExt()
		{
		}

		// Token: 0x0600031F RID: 799 RVA: 0x0000C18E File Offset: 0x0000A58E
		public ExtensionResult Read(byte[] bytes, int offset, out int readSize)
		{
			throw new InvalidOperationException(string.Format("code is invalid. code:{0} format:{1}", bytes[offset], MessagePackCode.ToFormatName(bytes[offset])));
		}

		// Token: 0x040000EF RID: 239
		internal static readonly IExtDecoder Instance = new InvalidExt();
	}
}
